!function(f){var k=!0,b=1,a="",x=0,i=!1;function s(t){var t=t.find(".swiper-slide-visible"),e=-1;t.each(function(){var t=f(this).find(".pp-post").outerHeight();ee&&(e=n(this).find(".pp-post-content").outerHeight())}),n(window).width()>=t.md&&(p=e),o.find(".pp-post-wrap").css("height",p)}"masonry"==c&&o.imagesLoaded(function(t){f.isotope({layoutMode:c,itemSelector:".pp-grid-item-wrap"})}),o.on("posts.rendered",function(t,e){new VideoHandler(e,n)}),$(o,1),w.find(".pp-post-filter").off("click").on("click",function(){var t;n(this).siblings().removeClass("pp-filter-current"),n(this).addClass("pp-filter-current"),b=1,0=o.find(".pp-coupons-grid-wrapper:last").offset().top&&(t={page_id:o.find(".pp-coupons-grid-wrapper").data("page"),widget_id:o.data("id"),filter:o.find(".pp-filter-current").data("filter"),taxonomy:o.find(".pp-filter-current").data("taxonomy"),skin:o.find(".pp-coupons-grid-wrapper").data("skin"),page_number:o.find(".page-numbers.current").next("a").html(),ajax_for:"coupon"},x=o.find(".pp-posts-pagination").data("total"),1==k&&b=o.find(".pp-post:last").offset().top&&(t={page_id:o.find(".pp-posts").data("page"),widget_id:o.data("id"),filter:o.find(".pp-filter-current").data("filter"),taxonomy:o.find(".pp-filter-current").data("taxonomy"),skin:o.find(".pp-posts").data("skin"),page_number:o.find(".pp-posts-pagination .current").next("a").html(),ajax_for:""},x=o.find(".pp-posts-pagination").data("total"),1==k&&b
'),e=1,p=parseInt(n.find(".pp-posts-pagination .page-numbers.current").html()),e=f(this).hasClass("next")?p+1:f(this).hasClass("prev")?p-1:f(this).html(),o={page_id:n.find(".pp-coupons-grid-wrapper").data("page"),widget_id:n.data("id"),filter:n.find(".pp-filter-current").data("filter"),taxonomy:n.find(".pp-filter-current").data("taxonomy"),page_number:e,ajax_for:"coupon"},f("html, body").animate({scrollTop:n.find(".pp-coupons-wrap").offset().top-30},"slow"),A(n,o)):($scope.find(".pp-posts .pp-post").last().after('
'),e=1,p=parseInt($scope.find(".pp-posts-pagination .page-numbers.current").html()),e=f(this).hasClass("next")?p+1:f(this).hasClass("prev")?p-1:f(this).html(),o={page_id:$scope.find(".pp-posts").data("page"),widget_id:$scope.data("id"),filter:$scope.find(".pp-filter-current").data("filter"),taxonomy:$scope.find(".pp-filter-current").data("taxonomy"),skin:$scope.find(".pp-posts").data("skin"),page_number:e,ajax_for:""},f("html, body").animate({scrollTop:$scope.find(".pp-posts-container").offset().top-30},"slow"),A($scope,o)))});var j=function(t,e,p){p="coupon"===p?(t.find(".pp-coupons-grid-wrapper .pp-grid-item-wrap").last().after('
'),{page_id:t.find(".pp-coupons-grid-wrapper").data("page"),widget_id:t.data("id"),filter:e.data("filter"),taxonomy:e.data("taxonomy"),page_number:1,ajax_for:"coupon"}):(t.find(".pp-posts .pp-grid-item-wrap").last().after('
'),{page_id:t.find(".pp-posts").data("page"),widget_id:t.data("id"),filter:e.data("filter"),taxonomy:e.data("taxonomy"),skin:t.find(".pp-posts").data("skin"),page_number:1,ajax_for:""}),A(t,p)},F=function(t,e){t.find(".pp-posts .pp-grid-item-wrap").last().after('
');var p={page_id:t.find(".pp-posts").data("page"),widget_id:t.data("id"),search:t.find(".pp-search-form-input").val(),page_number:1};A(t,p)},A=function(a,s,d,r){var l=a.find(".pp-posts-loader");f.ajax({url:pp_posts_script.ajax_url,data:{action:"pp_get_post",page_id:s.page_id,widget_id:s.widget_id,category:s.filter,search:s.search,taxonomy:s.taxonomy,skin:s.skin,page_number:s.page_number,ajax_for:s.ajax_for,nonce:pp_posts_script.posts_nonce},dataType:"json",type:"POST",success:function(t){var e,p,o,n,i;k=("coupon"===s.ajax_for?(e=a.find(".pp-coupons-grid-wrapper"),(p=a.find(".pp-posts-empty")).remove(),0==f(p).length&&f(t.data.not_found).insertBefore(e),1==d?(o=t.data.html,e.append(o)):e.html(t.data.html),a.find(".pp-posts-pagination-wrap").html(t.data.pagination)):(e=a.find(".pp-posts"),(p=a.find(".pp-posts-empty")).remove(),0==f(p).length&&f(t.data.not_found).insertBefore(e),1==d?(o=t.data.html,e.append(o)):e.html(t.data.html),a.find(".pp-posts-pagination-wrap").html(t.data.pagination),n=a.find(".pp-posts").data("layout"),i=a.find(".pp-posts"),"masonry"==n&&a.imagesLoaded(function(){i.isotope("reloadItems"),i.isotope({layoutMode:n,itemSelector:".pp-grid-item-wrap"})})),!0),1==d&&(l.hide(),a.find(".pp-post-load-more").show()),$(a,s.page_number),(r+=1)==x&&a.find(".pp-post-load-more").hide(),a.trigger("posts.rendered",[a])}}).done(function(){0